﻿<Window x:Class="AppDemo.Window1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
        xmlns:local="clr-namespace:AppDemo"
        Title="Window1" Height="300" Width="300">
    <Grid>
        
        <Button Content="Button" Height="23" HorizontalAlignment="Left" Margin="122,136,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" />
        <TextBox x:Name="demo1" Margin="89,0,61,236" TextChanged="demo1_TextChanged"></TextBox> 
        <Label Height="28" HorizontalAlignment="Left" Margin="42,45,0,0" Name="label1" VerticalAlignment="Top">
            <i:Interaction.Behaviors>
                <local:DependencyNotifyBehavior DependencyObject="{Binding Text,ElementName=demo1}" NotifyObject="Label.Content"/>
            </i:Interaction.Behaviors>
        </Label>
    </Grid>
</Window>
